function fctpwdrequestFocus()
{
	document.getElementById("usr_email").value = "";	
	document.getElementById("pwd_protect").value = "";		
	document.getElementById("usr_email").focus();
	return false;
}
function ajaxpwdrequest_val(objForm)
{
	var sURL = "ajaxpwdrequest_val.asp";	
	var sUsr_email = "";
	var sPwd_protect = "";
	var aValues = new Array();
	var iValue = 0;
	var sChain = "";	
	
	aValues[1]  = "hd28jz";
	aValues[2]  = "zy9zqk";
	aValues[3]  = "mp1a5k";
	aValues[4]  = "fqcu4b";
	aValues[5]  = "xcsga3";
	aValues[6]  = "4xf3io";
	aValues[7]  = "hya7oi";
	aValues[8]  = "uia3py";
	aValues[9]  = "tkw2qk";
	aValues[10] = "wkuq6s";	
		
	sUsr_email = document.getElementById("usr_email").value;	
	if(sUsr_email=='')
	{
			alert("Please enter and e-mail address.");
			document.getElementById("usr_email").focus();
			return false;
	}
	sPwd_protect = document.getElementById("pwd_protect").value;	
	if(sPwd_protect=='')
	{
			alert("Please enter the code shown in the image.");
			document.getElementById("pwd_protect").focus();
			return false;
	}

	iValue = parseInt(document.getElementById("img_protect").value);	
	sChain = aValues[iValue];	
	if (sPwd_protect != sChain)
	{
			alert("The code you entered does not match with the image code. Please reenter the code.");
			document.getElementById("pwd_protect").focus();
			return false;		
	}	
	
	//... Ajax to find possible names entered before ...//
	try
	{  
		 // Firefox, Opera 8.0+, Safari  
		 xmlHttp=new XMLHttpRequest();  
	 }
	 catch (e)
	 { 
		 // Internet Explorer  
		 try
		 {    
			   xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");    
		 }
		 catch (e)
		 {    
			   try
			   {      
					 xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");     
			   }
			   catch (e)
			   {      
					 //alert("Your browser does not support AJAX!");      
					 return false;      
			   }    
		 }  
	 }	   
	 xmlHttp.onreadystatechange=function()
	 {
		 if(xmlHttp.readyState==4)
		 {
			   sResponse = xmlHttp.responseText;
			   if(sResponse != "OK")
			   {
					alert(sResponse);
					document.getElementById("usr_email").focus();
					return false;
			   }
			   else
			   {
					objForm.submit();
					return true;
			   }
		 }
	 }
	 sURL = sURL + "?" + "usr_email=" + sUsr_email;
	 xmlHttp.open("GET", sURL, true);
	 xmlHttp.send(null);
}
